using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Practices.ObjectBuilder;
using Microsoft.Practices.CompositeWeb;
using System.Transactions;
using GC2.Entities.Seguridad;
using GC2.ExceptionHandler.Services;
using GC2.DataAccess.DASeguridad;

namespace GC2.Bussines.BMSeguridad
{
    public class BMSuperMenu
    {

        public BMSuperMenu(string coneccion)
        {
            this.Connection = coneccion;
        }

        private string connection = "";
        public string Connection
        {
            get { return connection; }
            set { connection = value; }
        }

        private List<SuperMenu> listaMenu = new List<SuperMenu>();
        private DASuperMenu daSuperMenu = new DASuperMenu();


        #region BMSuperMenuGetAll
        public List<SuperMenu> BMSuperMenuGetAll(SuperMenu menu)
        {
            try
            {
                listaMenu = daSuperMenu.DASuperMenuGetAll(Connection, menu);
                return listaMenu;
            }
            catch (Exception ex)
            {
                ExceptionBM exNew = new ExceptionBM();
                throw new System.Exception(exNew.exBM(ex.ToString()).ToString());
            }
        }
        #endregion
    }
}
